{{ header }} 
<div class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %} 
    <li><a href="{{ breadcrumb.href }} ">{{ breadcrumb.text }}</a></li>
    {% endfor %} 
  </ul>
  <div class="row">{{ column_left }} 
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
    <div id="content" class="{{ class }}">{{ content_top }}
      <h1 class="text-center">{{ heading_title }}</h1>
      <div class="text-center">
        <p>
          <img alt="微信扫码支付" src="http://paysdk.weixin.qq.com/example/qrcode.php?data={{ qrcode_url }}" style="width:150px;height:150px;">
        </p>
      </div>
      {{ content_bottom }} 
    </div>
    {{ column_right }} 
  </div>
</div>
<script type="text/javascript">
$(document).ready(function () {
	setInterval("ajaxstatus()", 3000);    
});

function ajaxstatus() {
		$.ajax({
		url: '{{ ajax_check_order_status }}&order_id={{ order_id }}',
		dataType: 'json',
		success: function(json) {
			if (json['success']) {
				window.location.href = "index.php?route=checkout/success";
			}
		},
		error: function(xhr, ajaxOptions, thrownError) {
			alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
		}
	});
} 
</script>
{{ footer }} 
